﻿using System;
using Colorful.Furniture.Enum;
using Colorful.Furniture.IEntity;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.ErpSupplierManagement;

/// <summary>
///  供应商金额变更记录
/// </summary>
[Table(Name = "erp_supplier_balance_log")]
public class SupplierBalanceLog
{
    /// <summary>
    ///  编码
    /// </summary>
    [Column(Name = "id")]
    public Guid Id { get; set; }

    /// <summary>
    ///  供应商编码
    /// </summary>
    [Column(Name = "supplier_id")]
    public Guid? SupplierId { get; set; }
    
    /// <summary>
    /// 变更金额
    /// </summary>
    [Column(Name = "change_price", Scale = 4, Precision = 16)]
    public decimal? ChangePrice { get; set; }

    /// <summary>
    /// 变更前金额
    /// </summary>
    [Column(Name = "before_price", Scale = 4, Precision = 16)]
    public decimal? BeforePrice { get; set; }

    /// <summary>
    /// 变更后金额
    /// </summary>
    [Column(Name = "after_price", Scale = 4, Precision = 16)]
    public decimal? AfterPrice { get; set; }

    /// <summary>
    /// 下游订单号（平台生成）
    /// </summary>
    [Column(Name = "order_down_no", StringLength = 60)]
    public string OrderDownNo { get; set; }

    /// <summary>
    ///  订单编码
    /// </summary>
    [Column(Name = "customer_order_id")]
    public Guid? CustomerOrderId { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Column(Name = "remark", StringLength = 200)]
    public string Remark { get; set; }

    /// <summary>
    ///  操作类型： 充值 = 3,人工扣款 = 7,订单扣款 = 12
    /// </summary>
    [Column(Name = "operator_type")]
    public EnumOperatorType? OperatorType { get; set; }

    /// <summary>
    ///  操作时间
    /// </summary>
    [Column(Name = "operator_time")]
    public DateTime? OperatorTime { get; set; }

    /// <summary>
    ///  操作人员姓名
    /// </summary>
    [Column(Name = "operator", StringLength = 50)]
    public string Operator { get; set; }

}

